<?php

class MultipleLog {

  private $loggers;
  
  public function logger($logger = null) {
    if( is_null($logger) ) { return $this->loggers; }
    $this->loggers[] = $logger;
    return $this;
  }
  
  public function log($message) {
    foreach($this->loggers as $logger){
      $logger->log($message);
    }
    return $message . "\n";
  }
  
  public function error($message) {
    foreach($this->loggers as $logger){
      $logger->error($message);
    }
    return $message . "\n";
  }
  
}